package org.merger.domain;
import java.util.HashMap;
import java.util.Map;



public class ProductRepository {
	private Map<Formula,Element> products = new HashMap<Formula, Element>();

	public Element merge(Element firstElement, Element secondElement) {
		Formula formula = new Formula(firstElement, secondElement);
		return products.get(formula);
	}
	
	public void addCombination (Element firstElement, Element secondElement, Element productElement) {
		products.put(new Formula(firstElement, secondElement), productElement);
	}
	
	public void removeCombination (Element firstElement, Element secondElement, Element product) {
		products.remove(new Formula(firstElement, secondElement));
	}
	
}
